﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Class.aspx.cs" Inherits="中学____排课系统.Class" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
        </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ClassID" DataSourceID="SqlDataSource1" Height="207px" Width="483px">
            <Columns>
                <asp:BoundField DataField="ClassID" HeaderText="ClassID" ReadOnly="True" SortExpression="ClassID" />
                <asp:BoundField DataField="RoomName" HeaderText="RoomName" SortExpression="RoomName" />
                <asp:BoundField DataField="Capacity" HeaderText="Capacity" SortExpression="Capacity" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:中学排课系统ConnectionString %>" DeleteCommand="DELETE FROM [Class] WHERE [ClassID] = @ClassID" InsertCommand="INSERT INTO [Class] ([ClassID], [RoomName], [Capacity]) VALUES (@ClassID, @RoomName, @Capacity)" SelectCommand="SELECT * FROM [Class]" UpdateCommand="UPDATE [Class] SET [RoomName] = @RoomName, [Capacity] = @Capacity WHERE [ClassID] = @ClassID">
            <DeleteParameters>
                <asp:Parameter Name="ClassID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="ClassID" Type="Int32" />
                <asp:Parameter Name="RoomName" Type="String" />
                <asp:Parameter Name="Capacity" Type="Int32" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="RoomName" Type="String" />
                <asp:Parameter Name="Capacity" Type="Int32" />
                <asp:Parameter Name="ClassID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:CheckBox ID="CheckBox1" runat="server" />
    </form>
</body>
</html>
